package com.zxbg.dao;

import com.zxbg.domain.InfoBlockMenu;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface InfoBlockMenuDao {
    @Select("select * from info_block_menu where tenant_id = #{tenant_id}")
    public List<InfoBlockMenu> getAllInfoBlock(Integer tenant_id);

    @Update("update info_block_menu set show_icon = #{show_icon}, updater_id = #{updater_id}, update_time = #{update_time}, menu_name_zh = #{menu_name_zh}, menu_name_en = #{menu_name_en} where id = #{id}")
    public Integer updateInfoBlockMenu(InfoBlockMenu infoBlockMenu);

    @Select("select * from info_block_menu where id = #{id} and tenant_id = #{tenant_id}")
    public InfoBlockMenu selectInfoBlockById(@Param("id") String id, @Param("tenant_id") Integer tenant_id);
}
